Skip to content

Fix/intune anomalies 1.2.1#8

Merged
royklo merged 5 commits into
mainfrom
fix/intune-anomalies-1.2.1
Jun 18, 2026
Merged

Fix/intune anomalies 1.2.1#8
royklo merged 5 commits into
mainfrom
fix/intune-anomalies-1.2.1

Conversation

@royklo

@royklo royklo commented Jun 18, 2026

Copy link
Copy Markdown
Owner

8f0b6aa release: bump ModuleVersion to 1.2.1 and cut dated CHANGELOG section
fa79c1d fix(report-template): wrap long values in table cells across all reports
2ee7348 fix(invoke-rkgraphbatch): fast-fail non-transient HTTP and log Graph error body
94e7ea8 fix(intune-anomalies): dedupe compliance setting-state pairs and add per-request fallback
f05b1f2 Merge pull request #7 from royklo/feature/intune-anomalies-bitlocker-laps ← origin/main

Roy Klooster added 4 commits June 18, 2026 11:25
…per-request fallback

Graph occasionally returns the same deviceCompliancePolicyState id twice
for one device (multi-assignment paths), producing duplicate sub-request
ids in the batch and a 400 'Request Id ... has to be unique in a batch.'
Dedupe pairs via HashSet at the build site. When a sub-request still
returns non-200 (any reason), fall back to a per-request GET so the
Noncompliant Reason column gets the real rule name instead of 'Unknown'.
…error body

The catch block previously retried any exception with exponential backoff,
turning a permanent 400 BadRequest into a 62s hang (2+4+8+16+32). Now it
inspects the HTTP status, retries only 408/429/5xx (and unknown/network
errors), and surfaces $_.ErrorDetails.Message via Write-Verbose so the
actual Graph rejection reason shows up in the trace.
Long unbreakable strings (UPNs, device serials, group GUIDs) overflowed
their column and bled into the neighbouring cell. Add word-break /
overflow-wrap to the shared .table tbody td rule so every report (not
just Intune Anomalies) wraps long values inside their cell.
Copilot AI review requested due to automatic review settings June 18, 2026 09:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR publishes patch release 1.2.1 of the RKSolutions PowerShell module, focused on improving reliability and performance of the Intune Anomalies compliance-details fetch (Graph $batch) and fixing HTML report table overflow for long values.

Changes:

  • Bump module version to 1.2.1 and add a dated CHANGELOG entry describing the patch fixes.
  • Improve Graph $batch behavior: fast-fail non-transient HTTP errors, log Graph error bodies, and add a per-request fallback when $batch sub-requests fail.
  • Update shared report template CSS to wrap long strings inside table cells across reports.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
module/RKSolutions.psd1 Bumps ModuleVersion to 1.2.1.
module/Private/Invoke-RKGraphBatch.ps1 Adds HTTP-status-based retry policy and verbose logging of Graph error bodies.
module/Private/IntuneAnomalies.ps1 Dedupes compliance setting-state pair IDs and adds per-request fallback for failed batch sub-requests.
module/Private/Get-RKSolutionsReportTemplate.ps1 Adds CSS to wrap/break long table cell values.
CHANGELOG.md Adds 1.2.1 release notes and date.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread module/Private/IntuneAnomalies.ps1 Outdated
Comment on lines +1452 to +1456
$states = @($resp.Body.value | Where-Object { $_.State -eq 'nonCompliant' -or $_.State -eq 'Error' })
if ($states.Count -eq 0 -or $states.Count -gt 10) { continue }
$ComplianceRulesByDevice[$deviceId] = [System.Collections.Generic.List[string]]::new()
foreach ($s in $states) {
$pairId = "ss:$deviceId|$($s.id)"
The <=10 cap was counting raw Graph results, so a device with duplicated
policy-state entries (multi-assignment paths) could be skipped entirely
even when its unique state count was within the limit. Dedupe per
(deviceId, stateId) before the count guard; this also makes the in-loop
HashSet check redundant since the pair build can no longer see duplicates.
@royklo royklo merged commit f7130a0 into main Jun 18, 2026
2 checks passed
@royklo royklo deleted the fix/intune-anomalies-1.2.1 branch June 18, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants